<?php
namespace app\common\model;

use think\Model;

class User extends Base
{

	/**
	 * [edituserData 修改用户信息]
	 * @param  array  $user [description]
	 * @param  array  $data      [description]
	 * @return [type]            [description]
	 */
    public function editUserData($condition = [],$data = []){
        $this->allowField(true)->save($data,$condition);
        return $this->getlastsql();
    }


    public function getUsersUserId($userIds = []){
    	$data = [
    		'id'=>['in',implode(',',$userIds)],
    		'status'=>1
    	];

    	$order = [
    		'id'=>'desc'
    	];

    	return $this->where($data)
    	->order($order)
    	->field(['id','username','image'])
    	->select();
    }

}
